package com.lijian.community.enums;

public enum NoticeTypeEnum {
    REPLY_QUESTION(1, "回复了问题"),
    REPLY_COMMENT(2, "回复了评论");

    private Integer type;

    private String name;

    public Integer getType() {
        return type;
    }
    public String getName() {
        return name;
    }
    NoticeTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }
    public static String nameOfType(Integer type){
        for (NoticeTypeEnum noticeTypeEnum : NoticeTypeEnum.values()) {
            if(noticeTypeEnum.getType() == type){
                return noticeTypeEnum.getName();
            }
        }
        return "";
    }
}
